let arr=[1,2];
let b=arr.pop();
console.log(b,arr);